{cond:admin}
<span style="float:right; margin-top: 1.2em"><?= anchor('topic/admin/delete/'.$info['id'].'/'.$info['parent_id'], 'Delete', array('class' => 'admin'))?></span>
{/cond:admin}

<h3 class="topic_title" id="<?= $info['id'] ?>"> <?= $info['name']?> </h3>
<? foreach($posts as $post): ?>
<? $user = $this->User->get_user($post['user_id']) ?>
<table class="single_post">
	
	<tr class='author'>
		<td><?= anchor('member/profile/view/'.$post['user_id'], $post['username']) ?></td>
		<td><?= mdate('%d %F %h:%i %A', gmt_to_local($post['created'], $this->_user['timezone'], $this->_user['daylight_savings'])) ?></td>
	<tr/>
	
	<tr>
	<td valign="top">
		<table border="0" class='about'>
			<tr><td>Insert Image Here</td></tr>
			<tr><td><strong>Total Posts: </strong><?= $user['post_count'] ?></td></tr>
			<tr><td><strong>Joined: </strong><?= date('m/d/Y', $user['joined']) ?></td></tr>
		</table>
	</td>

	<td class='post_body' valign="top">
		<?= $post['content'] ?>
	</td>
	</tr>
	
	<tr>
		<td colspan="2">
			<table border="0" class="actions">
				<tr>
					<td>Quote</td>

					{user}
					<? if ($post['user_id'] == $this->_user['id']): ?>
						<td><?= anchor('post/edit/'.$post['id'].'/'.$info['id'], 'Edit')?></td>
					<? else: ?>
						{cond:admin}
						<td><?= anchor('post/edit/'.$post['id'].'/'.$info['id'], 'Edit', array('class' => 'admin'))?></td>
						{/cond:admin}
					<? endif; ?>
					{/user}

					{cond:admin}
					<td><?= anchor('post/admin/delete/'.$post['id'].'/'.$info['id'], 'Delete', array('class' => 'admin delete_confirm'))?></td>
					{/cond:admin}
				</tr>
			</table>
		</td>
	</tr>
</table>

<? endforeach; ?>

{user}
<?= anchor('post/reply/'.$info['id'], 'Add Reply') ?>
{/user}

{cond:admin_box}
{/cond:admin_box}